/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80020
 Source Host           : 192.168.5.116:3306
 Source Schema         : myclassphp-shop

 Target Server Type    : MySQL
 Target Server Version : 80020
 File Encoding         : 65001

 Date: 13/07/2020 17:41:41
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for mc_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `mc_auth_group`;
CREATE TABLE `mc_auth_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(40) DEFAULT NULL COMMENT '分组名',
  `rules` text COMMENT '权限值',
  `create_time` int DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mc_auth_group
-- ----------------------------
BEGIN;
INSERT INTO `mc_auth_group` VALUES (1, '超级管理员', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for mc_auth_info
-- ----------------------------
DROP TABLE IF EXISTS `mc_auth_info`;
CREATE TABLE `mc_auth_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uid` int DEFAULT '0' COMMENT '绑定的用户ID',
  `group_id` int DEFAULT '0' COMMENT '分组ID',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mc_auth_info
-- ----------------------------
BEGIN;
INSERT INTO `mc_auth_info` VALUES (4, 1, 1);
COMMIT;


-- ----------------------------
-- Table structure for mc_config
-- ----------------------------
DROP TABLE IF EXISTS `mc_config`;
CREATE TABLE `mc_config` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(40) NOT NULL COMMENT '配置名',
  `value` text NOT NULL COMMENT '配置值',
  `type` tinyint(1) DEFAULT '1' COMMENT '配置类型 1文本 2json 3图片',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='配置表';

-- ----------------------------
-- Records of mc_config
-- ----------------------------
BEGIN;
INSERT INTO `mc_config` VALUES (40, 'hosts', 'http://test.myclassphp.com');
COMMIT;

-- ----------------------------
-- Table structure for mc_logs
-- ----------------------------
DROP TABLE IF EXISTS `mc_logs`;
CREATE TABLE `mc_logs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `uid` int unsigned NOT NULL COMMENT '操作人ID',
  `title` varchar(100) NOT NULL DEFAULT '' COMMENT '操作描述',
  `extra` text COMMENT '操作备注',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=292 DEFAULT CHARSET=utf8 COMMENT='用户日志表';

-- ----------------------------
-- Records of mc_logs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mc_sys_module
-- ----------------------------
DROP TABLE IF EXISTS `mc_sys_module`;
CREATE TABLE `mc_sys_module` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `uid` int DEFAULT '1' COMMENT '安装人',
  `name` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '模块名',
  `create_time` int DEFAULT NULL COMMENT '安装时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Table structure for mc_sys_tokens
-- ----------------------------
DROP TABLE IF EXISTS `mc_sys_tokens`;
CREATE TABLE `mc_sys_tokens` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `uid` int unsigned NOT NULL COMMENT '用户ID',
  `token` varchar(40) NOT NULL COMMENT '访问token',
  `expire_time` int NOT NULL DEFAULT '0' COMMENT '过期时间',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 0 失效 1 有效',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '类型',
  `last_time` int unsigned NOT NULL DEFAULT '0' COMMENT '最后更新时间',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户tokens表';

-- ----------------------------
-- Table structure for mc_sys_users
-- ----------------------------
DROP TABLE IF EXISTS `mc_sys_users`;
CREATE TABLE `mc_sys_users` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `nickname` varchar(40) NOT NULL COMMENT '名称',
  `account` varchar(40) NOT NULL COMMENT '账号',
  `password` varchar(60) NOT NULL DEFAULT '' COMMENT '密码',
  `last_time` int unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='后台管理员表';

-- ----------------------------
-- Records of mc_sys_users
-- ----------------------------
BEGIN;
INSERT INTO `mc_sys_users` VALUES (1, 'Supper Master', 'admin', '$2y$10$uMDDyR4Fsr0ItCk/l3JKL.jPQWvsrutK24SYV8VF.rbFQaAOPLYvy', 1594605998, 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
